import { request } from '@pkg/request/src';

export enum Api {
  page = '/airport/page',
  list = '/airport/list',
  get = '/airport/get',
  add = '/airport/save',
  update = '/airport/update',
  remove = '/airport/remove',
  getTiyanVipcardList = '/vipcard/getTiyanVipcardList',
}

export const airportList = (params) =>
  request.get(
    { url: Api.list ,params},
    {
      errorMessageMode: 'none',
      successMessageMode: 'none',
    },
  );

export const get = (id: string) =>
  request.get(
    {
      url: Api.get,
      params: { id: id },
    },
    { errorMessageMode: 'none', successMessageMode: 'none' },
  );

export const getTiYanVipcardList = (params) =>
  request.get(
    {
      url: Api.getTiyanVipcardList,
      params: params,
    },
    { errorMessageMode: 'none', successMessageMode: 'none' },
  );
